package com.zhouyu;

import com.my.OrderService;
import com.zhouyu.service.UserService;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Test {

	public static void main(String[] args) {

		AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(AppConfig.class);
		UserService userService = (UserService) applicationContext.getBean("userService");
		MyAppConfig myAppConfig = (MyAppConfig) applicationContext.getBean("myAppConfig");
		OrderService orderService = (OrderService) applicationContext.getBean("orderService");
		myAppConfig.test();
		userService.test();
		orderService.test();

	}
}
